<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>资源模型</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>   
	<%@ include file="../include/common.jsp"%>
    <%@ include file="../include/tree.jsp"%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/iframe.js"></script>
	<script type=text/javascript>
		function setContent() {
			var windowHeight = getWindowHeight();
			var contentElement = document.getElementById('contentFrame');
	    	contentElement.style.height = (windowHeight) + 'px';
	    
	    	 $("#resTypeTree").css("height",windowHeight-10);
		}
		function onClick(e, treeId, treeNode) {
			$('#contentFrame').attr('src','res-type!model.action?id='+treeNode.id);
		}
	
		var setting = {
			async: {
				enable: true,
				url:"res-type!typeTree.action",
				dataType: "text",
				autoParam:["id"]
			},
			callback: {
				onClick: onClick
			},
			view: {
				dblClickExpand: false,
				showLine: false
			}
		};
		
		$(document).ready(function(){
			$.fn.zTree.init($("#resTypeTree"),setting);
			
			outerLayout = $('body').layout({
						center__paneSelector:	    ".outer-center" 
						,	west__paneSelector:		".outer-west" 
						,	west__size:				190
						,	spacing_open:			8 // ALL panes
						,	spacing_closed:			8 // ALL panes
						,   togglerTip_open:'关闭'
						,   togglerTip_closed: "显示"
						,   center__onresize:		"centerLayout.resizeAll"
						,   slidable:false
						
			});
		});
	</script>
  </head>
  
  <body>
  	<div class="outer-west" >
	 		 <div id="resTypeTree" class="ztree" style="overflow: auto;"></div>
  	</div>
  <div class="outer-center" id="outer-center">
  	<iframe id="contentFrame" name="contentFrame" src=""  frameborder="0" width="100%" height="100%" ></iframe>
  </div>
 
  </body>
</html>
